{"componentChunkName":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js","path":"/code-style/OfferBase-OBE","result":{"data":{"mdx":{"id":"ba84451b-e1bc-5aec-a8a5-c68bf39d5e4b","excerpt":"OBE-01C: Redundant Conditional Validation Type Severity Location Gas Optimization OfferBase.sol:L115 Description: The referenced conditional will redundantly…","fields":{"slug":"/code-style/OfferBase-OBE/"},"frontmatter":{"title":"OfferBase Code Style Findings","description":"Contains all the findings that relate to code style on the contract codebase","image":null,"disableTableOfContents":null},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"OfferBase Code Style Findings\",\n  \"description\": \"Contains all the findings that relate to code style on the contract codebase\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idobe-01cobe-01c-redundant-conditional-validationspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idobe-01cobe-01c-redundant-conditional-validationspan\",\n    \"aria-label\": \"span idobe 01cobe 01c redundant conditional validationspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"OBE-01C\"\n  }, \"OBE-01C: Redundant Conditional Validation\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.5.0-68d13ccd7155940015e05fd3/appendix/finding-types#gas-optimization\"\n  }, \"Gas Optimization\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/bases/OfferBase.sol#L115\"\n  }, \"OfferBase.sol:L115\"))))), mdx(\"h3\", {\n    \"id\": \"description\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description\",\n    \"aria-label\": \"description permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced conditional will redundantly evaluate whether the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"OfferCreator\"), \" enum of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Offer\"), \" structure is a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Buyer\"), \" even though the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"enum\"), \" supports two states and one of the two has already been excluded.\"), mdx(\"h3\", {\n    \"id\": \"example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example\",\n    \"aria-label\": \"example permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/bases/OfferBase.sol highlight={1,12} lineNumbers=true lineOffset=103\",\n    \"title\": \"contracts/protocol/bases/OfferBase.sol\",\n    \"highlight\": \"{1,12}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"103\"\n  }, \"if (_offer.creator == OfferCreator.Seller) {\\n    if (_offer.buyerId != 0) revert InvalidBuyerOfferFields();\\n\\n    // Validate caller is seller assistant\\n    if (_authenticate) {\\n        (bool isAssistant, uint256 sellerId) = getSellerIdByAssistant(sender);\\n        if (!isAssistant) {\\n            revert NotAssistant();\\n        }\\n        _offer.sellerId = sellerId;\\n    }\\n} else if (_offer.creator == OfferCreator.Buyer) {\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation\",\n    \"aria-label\": \"recommendation permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the referenced conditional to be set to an \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"else\"), \" clause, optimizing its gas cost.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119\",\n    \"aria-label\": \"alleviation efd5d1a8f23c3bca7c25273ea4c912a367250119 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):\"), mdx(\"p\", null, \"The Boson Protocol team evaluated this exhibit and opted to retain the code as is as they consider it to be more legible and future-proof.\"), mdx(\"h2\", {\n    \"id\": \"span-idobe-02cobe-02c-unspecified-revert-conditionsspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idobe-02cobe-02c-unspecified-revert-conditionsspan\",\n    \"aria-label\": \"span idobe 02cobe 02c unspecified revert conditionsspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"OBE-02C\"\n  }, \"OBE-02C: Unspecified Revert Conditions\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.5.0-68d13ccd7155940015e05fd3/appendix/finding-types#code-style\"\n  }, \"Code Style\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/bases/OfferBase.sol#L122\"\n  }, \"OfferBase.sol:L122\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/bases/OfferBase.sol#L123\"\n  }, \"L123\"))))), mdx(\"h3\", {\n    \"id\": \"description-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-1\",\n    \"aria-label\": \"description 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced two conditions represent \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"revert\"), \" cases that are undocumented.\"), mdx(\"h3\", {\n    \"id\": \"example-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-1\",\n    \"aria-label\": \"example 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/bases/OfferBase.sol highlight={73,74} lineNumbers=true lineOffset=49\",\n    \"title\": \"contracts/protocol/bases/OfferBase.sol\",\n    \"highlight\": \"{73,74}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"49\"\n  }, \"/**\\n * @notice Creates offer. Can be reused among different facets.\\n *\\n * Emits an OfferCreated event if successful.\\n *\\n * Reverts if:\\n * - Caller is not an assistant in case of seller-initiated offer\\n * - sellerId is not 0 when buyer-initiated offer is created\\n * - collectionIndex is not 0 when buyer-initiated offer is created\\n * - royaltyInfo is not empty when buyer-initiated offer is created\\n * - priceType is not Static when buyer-initiated offer is created\\n * - Invalid offer creator value specified (OfferCreator.Seller or OfferCreator.Buyer)\\n * - Valid from date is greater than valid until date\\n * - Valid until date is not in the future\\n * - Both voucher expiration date and voucher expiration period are defined\\n * - Neither of voucher expiration date and voucher expiration period are defined\\n * - Voucher redeemable period is fixed, but it ends before it starts\\n * - Voucher redeemable period is fixed, but it ends before offer expires\\n * - Dispute period is less than minimum dispute period\\n * - Resolution period is not between the minimum and the maximum resolution period\\n * - Voided is set to true\\n * - Available quantity is set to zero\\n * - Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver\\n * - Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver\\n * - Seller is not on dispute resolver's seller allow list\\n * - Dispute resolver does not accept fees in the exchange token\\n * - Buyer cancel penalty is greater than price\\n * - When agent id is non zero:\\n *   - If Agent does not exist\\n * - If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit determined by the protocol\\n * - If the sum of agent fee amount and protocol fee amount is greater than fee limit set by seller\\n * - Royalty recipient is not on seller's allow list\\n * - Royalty percentage is less than the value decided by the admin\\n * - Total royalty percentage is more than max royalty percentage\\n *\\n * @param _offer - the fully populated struct with offer id set to 0x0 and voided set to false\\n * @param _offerDates - the fully populated offer dates struct\\n * @param _offerDurations - the fully populated offer durations struct\\n * @param _drParameters - the id of chosen dispute resolver (can be 0) and mutualizer address (0 for self-mutualization)\\n * @param _agentId - the id of agent\\n * @param _feeLimit - the maximum fee that seller is willing to pay per exchange (for static offers)\\n * @param _authenticate - whether to authenticate the caller. Use false when called from a handler that already authenticated the caller.\\n */\\nfunction createOfferInternal(\\n    Offer memory _offer,\\n    OfferDates calldata _offerDates,\\n    OfferDurations calldata _offerDurations,\\n    BosonTypes.DRParameters calldata _drParameters,\\n    uint256 _agentId,\\n    uint256 _feeLimit,\\n    bool _authenticate\\n) internal returns (uint256 offerId) {\\n    address sender = _msgSender();\\n\\n    if (_offer.creator == OfferCreator.Seller) {\\n        if (_offer.buyerId != 0) revert InvalidBuyerOfferFields();\\n\\n        // Validate caller is seller assistant\\n        if (_authenticate) {\\n            (bool isAssistant, uint256 sellerId) = getSellerIdByAssistant(sender);\\n            if (!isAssistant) {\\n                revert NotAssistant();\\n            }\\n            _offer.sellerId = sellerId;\\n        }\\n    } else if (_offer.creator == OfferCreator.Buyer) {\\n        if (\\n            _offer.sellerId != 0 ||\\n            _offer.collectionIndex != 0 ||\\n            _offer.royaltyInfo.length != 1 ||\\n            _offer.royaltyInfo[0].recipients.length != 0 ||\\n            _offer.royaltyInfo[0].bps.length != 0 ||\\n            _drParameters.mutualizerAddress != address(0) ||\\n            _offer.quantityAvailable != 1 ||\\n            _offer.priceType != PriceType.Static\\n        ) {\\n            revert InvalidBuyerOfferFields();\\n        }\\n        if (_authenticate) _offer.buyerId = getValidBuyer(payable(sender));\\n    }\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-1\",\n    \"aria-label\": \"recommendation 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise them to be properly documented in line with the rest of the codebase.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119-1\",\n    \"aria-label\": \"alleviation efd5d1a8f23c3bca7c25273ea4c912a367250119 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):\"), mdx(\"p\", null, \"The referenced conditions have been properly documented in the function's \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"revert\"), \" cases, addressing this exhibit.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/bosonprotocol/boson-protocol-contracts\",\n    mainHash: \"6a14c31bead936ed03b2d51ab82010ecd1047f40\",\n    fixHash: \"efd5d1a8f23c3bca7c25273ea4c912a367250119\",\n    gitHubIssue: \"1060\",\n    mdxType: \"ViewDiffButton\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","headings":[{"depth":2,"value":"<span id=\"OBE-01C\">OBE-01C: Redundant Conditional Validation</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):"},{"depth":2,"value":"<span id=\"OBE-02C\">OBE-02C: Unspecified Revert Conditions</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):"}]}},"pageContext":{"slug":"/code-style/OfferBase-OBE/","prev":{"label":"FundsBase.sol (FBE-C)","link":"/code-style/FundsBase-FBE"},"next":{"label":"ProtocolBase.sol (PBE-C)","link":"/code-style/ProtocolBase-PBE"}}},"staticQueryHashes":["1954253342","2328931024","2501019404","973074209"]}